Vue.component("textmsg_comp",{
	props:['account','position','msg_content','time','head_icon'],
	data:function(){
		return{
			position_left:true,
			position_right:false
		};
	},
	template:loadHTML("components/textmsg_comp/textmsg_comp.html"),
	ready:function(){
		this.msg_content=this.replace_em(this.msg_content);
		if(this.position=="left"){
			this.position_left=true;
			this.position_right=false;
		}else{
			this.position_left=false;
			this.position_right=true;
		}
		
	},
	methods:{
		init:function(data){
			
		},
		replace_em:function(str){
			str = str.replace(/\</g,'&lt;');
			str = str.replace(/\>/g,'&gt;');
			str = str.replace(/\n/g,'<br/>');
			str = str.replace(/\[em_([0-9]*)\]/g,'<img src="images/arclist/$1.gif" border="0" />');
			return str;
		},
		
	}
});